package com.doge.walknovel.business.reader

import com.doge.walknovel.api.model.NovelDetailInfo
import com.doge.walknovel.api.model.ChapterInfo
import com.doge.walknovel.api.model.TextInfo


data class ReaderState(
    val novel: NovelDetailInfo? = null,
    val list: List<String> = listOf(), // chaptersTitle+texts
    val texts: Map<String, TextInfo> = mapOf(), // key is chapterId+textId
    val chapters: Map<String, ChapterInfo> = mapOf(), // key is chapterId
    val preChapterId: Int? = null,
    val nextChapterId: Int? = null,
) {
    companion object {
        const val ID_READER_PRE = "pre"
        const val ID_READER_NEXT = "next"
        const val ID_CHAPTER_TITLE = "t"
        const val ID_LOCKED = "locked"
    }
}

